using B.S.XZYData.Domain.XZY;
using B.S.XZYData.ErrorCode;
using MediatR;

namespace B.S.XZYData.Api.Wrter.Application.Command.Team
{
    /// <summary>
    /// 编辑班组命令
    /// </summary>
    public class UpdateTeamCommand : IRequest<ApiResult<bool>>
    {
        /// <summary>
        /// 班组ID
        /// </summary>
        public int TeamId { get; set; }

        /// <summary>
        /// 班组名称
        /// </summary>
        public string TeamName { get; set; } = string.Empty;

        /// <summary>
        /// 编组编码
        /// </summary>
        public string TeamCode { get; set; } = string.Empty;

        /// <summary>
        /// 班组类型
        /// </summary>
        public TeamTypeEnum TeamType { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 班组成员列表
        /// </summary>
        public List<UpdateTeamMemberRequest> TeamMembers { get; set; } = new List<UpdateTeamMemberRequest>();
    }

    /// <summary>
    /// 编辑班组成员请求
    /// </summary>
    public class UpdateTeamMemberRequest
    {
        /// <summary>
        /// 班组成员ID（0表示新增）
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        public long AccountId { get; set; }

        /// <summary>
        /// 成员名称
        /// </summary>
        public string MemberName { get; set; } = string.Empty;

        /// <summary>
        /// 成员真实姓名
        /// </summary>
        public string MemberRealName { get; set; } = string.Empty;

        /// <summary>
        /// 电话号码
        /// </summary>
        public string? Phone { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDeleted { get; set; } = false;
    }
}
